import Cookies from 'js-cookie'

type CookieOption = {
    path?: string;
    domain?: string;
    expires?: number;
}

export function setCookie(name: string, value: string, option: CookieOption = { path: '/', domain: '.gaodun.com', expires: 7}){
    Cookies.set(name, value, option);
}

export function getCookie(key: string){
    return Cookies.get(key)
}

export function delCookie(key: string, option: CookieOption = {path: '/', domain: '.gaodun.com'}){
    return Cookies.remove(key, option)
}

